package com.study.common.tree;

/**
 * @author yaojinshan
 * @version 1.0
 * @description:  B tree 测试类
 * @date 2019/7/22 16:30
 */
public class BTreeTest {

    public static void main(String[] args) {
        Btree btree = new Btree();
        btree.insert(30);
        btree.insert(83);
        btree.insert(46);
        btree.insert(84);
        btree.insert(45);
        btree.insert(57);
        btree.insert(85);
        btree.insert(22);
        btree.insert(11);
        btree.insert(29);
        btree.insert(28);
        btree.insert(82);
        btree.insert(67);
        btree.infixOrder(btree.getRootNode());
        System.out.println();
        btree.preOrder(btree.getRootNode());
        System.out.println();
        btree.postOrder(btree.getRootNode());
        System.out.println();
        System.out.println(btree.findMax().getNodeValue());
        System.out.println(btree.findMin().getNodeValue());
    }
}
